import request from '@/utils/request'

// 查询不合格品列表
export function listNonconformity(query) {
  return request({
    url: '/qms/nonconformity/list',
    method: 'get',
    params: query
  })
}

// 查询不合格品详细
export function getNonconformity(noncUuid) {
  return request({
    url: '/qms/nonconformity/' + noncUuid,
    method: 'get'
  })
}

// 新增不合格品
export function addNonconformity(data) {
  return request({
    url: '/qms/nonconformity',
    method: 'post',
    data: data
  })
}

// 修改不合格品
export function updateNonconformity(data) {
  return request({
    url: '/qms/nonconformity',
    method: 'put',
    data: data
  })
}

// 删除不合格品
export function delNonconformity(noncUuid) {
  return request({
    url: '/qms/nonconformity/' + noncUuid,
    method: 'delete'
  })
}
